2022-12-29
Status Update 2022
So apparently 2022 is almost over. Oh snap! Let's take a look at what I did this year. Not as much as I usually do, thanks to university and my social life keeping me fairly busy, but still enough to write about.
I started a new big project: nfm. For a long time I have been unhappy with the state of terminal file managers on Linux. They are slow, overengineered and poorly integrated with both the graphical desktop and the terminal itself. I decided I can do better, and so nfm was created. My idea is to create terminal file manager for people who usually just use the shell for file management. As such it does not actually implement any file management functionality itself. Instead it helps you compose shell commands, graphically and interactively. As such it will work with all your shell habits, scripts and tools. And thanks to a suggestion from Isaac, it is right now the only terminal file manager I know that implements Miller columns correctly!

There are still some rough spots, but with one or two exceptions the UI is already what I want it to be. After the UI is done, I will tag a first release and then focus closely on shell integration. This project has already attracted contributors, so if I eventually get around to reviewing patches, this should not take quite as long. Many thanks of course to the people who did send patches!
Because ncurses sucks and since the available zig libraries did not impress me much, I hand-rolled the terminal handling code in nfm. Eventually this became complex enough that I decided to move that into a dedicated library: zig-spoon. To my knowledge, it is right now the only viable pure-zig TUI library. Mostly by accident, mind you, since the few alternatives are still not usable or implement certain things just plain wrong. Writing a TUI library is in fact quite annoying. The deeper you go the more you know the truth: The terminal sucks. But it's worth it!
For the longest time I had the desire to have some sort of system, where I could quickly create little purpose-build programs with a sane UI. You know, like sometimes when you have a very specific problem, so that it wouldn't really make sense to write a proper program for it, yet you would still like something better than a shell script. I believe this is what people like about emacs, for example. No matter the use case, twenty lines of elisp later you have program with a pretty okay user interface that takes care of the job.
With the creation of zig-spoon, I have very effectively created the UI building components I wanted, and zig is certainly a nice enough language for mini-applications, like this one I use to track my university study times:.

GPGs pinentry prompt eventually annoyed me enough that I created my own: wayprompt. Unlike the default pinentry programs it is a desktop widget and not a regular window. Understanding the protocol spoken between gpg-agent and the pinentry program was ... certainly something, maybe I'll write a dedicated blog post about that eventually. Or just search for the various rant comments in the code if you want a brief overview of the fun.
// Assuan messages are limited to 1000 bytes per spec. However, documentation
// for the pinentry commands states that string can be up to 2048 bytes long
// (it actually says "characters", but I assume / hope bytes are what they mean).

lswt has had two releases, dropping the dependency on the xdg-output extension (thanks to wayland 1.20!) and fixing a bug unveiled by wlroots version 0.15.0. As a pointless but fun new feature, I also added another output format, dot, which allows graphical toplevel listings!

I landed a few quality of life changes in river, notably keyboard groups, which I need for my new keyboard, as well as adding a new user_command_tags
event to the river layout protocol, which makes layout generators implementing per-tag configuration less hacky, and adding a command to set (and change) the keyboard layout at runtime. I also turned the init file not being executable into a fatal error; This is one of the top mistakes people seek help for on IRC and this should make it a lot more obvious.
News from small projects: wlopm saw its first release. Thanks to Michael Amadio snayk now has a .desktop
file and a fancy Icon! Hopefully I can get around soon to finishing some rough edges and tagging a release. I also created a small pomodoro-timer, zomo, which helped me figure out that I do not like the pomodoro technique. river-tag-overlay got some improvements, like the options to display multiple rows of tags. stacktile had its first release and was swiftly after rewritten in zig. It now features a more powerful layout model and a dedicated configuration file. I decided to also tag a first release for wat, since it has been useful for me recently and I suppose it could be for others as well. And finally I decided to play around with procedural generation a bit, so I created ansiscape, a silly little program that dumps landscapes to the terminal.
This year I decided to abandon one of my older projects: lavalauncher. It started as a fun little excercise and at the time it was unique. But since it was my first Wayland project, the codebase grew into a mess. Certainly fixable (see the lavalauncher-next
branch if you are interested), but since I do not actually use it anymore, I am not motivated to see that through. Especially since now there are alternative programs which do the same thing, although in my humble opinion not quite as well :)
. As such, anyone interested in maintainership can message me, or just fork it. Or just start fresh.
I decided that my status update will now also hold small stories I'd like to share, that don't really warrant their own dedicated blog posts. These were all written some time ago. Here they are in chronological order:
I fixed the instability of my main workstation. Turns out the ath9k driver for atheros wireless chips regressed recently and does not do well with high traffic, even crashing sometimes. I have a number of wireless chips lying around. Most of them I could not use, most because they are also atheros devices, and one because it is internalla a USB device despite bein on a PCI card (the USB atheros driver, in contrast to the PCI atheros driver, flashes the WiFi LED constantly, which is insanely annoying). I ended up just stealing the one from my secondary workstation (which, as I then quickly found out, refuses to book without a wireless chip). The one has a bluetooth module built-in, so together with the bluetooth module on the ThinkPads motherboard my laptop now has two bluetooth devices. Yes, it can now pair to itself. Yes, I can connect a bluetooth speaker as output and then dial in the laptop as a bluetooth sink from my phone, routing audio from phone to speaker with a laptop in the middle. Yes, it makes no sense.
-
My ThinkPad is no longer my primary workstation. I finally managed to have the motivation to setup my desktop computer. Decided to give NixOS a try and was pretty disappointed. That SSD died a few months later any my next installation was a different OS.
I was too lazy to set up new Linux installation right away, so I tried to use a Windows disk I had lying around from that one time I felt the sudden urge to re-visit Fallout New Vegas. Turns out Windows still sucks, go figure. I found myself using the workstation less and less because of all the many paper cuts, so back to a sane operating system it was. And I though Linux was supposed to be the annoying OS?
I removed the speaker from my ThinkPad. Apparently, ThinkPads make a loud "deedoodeedoo"-alarm when you try to power them up when the battery is effectively empty. Who decided that 1) the laptop needs to make a loud alarm (Maybe this is a libreboot / coreboot thing?) and 2) who decided the PC-speaker-emulation should turn the laptops sound-system to max volume? This isn't just a problem with the thinkpad, I had a modern laptop in my teens with pretty decent speakers that could get very loud. It once had RAM problems in the middle of the night when I tried to boot it up and it blasted a bleeping sound at full volume. What the hell? Anyway, I have a wonky battery right now, which sometimes reports being empty despite being good, so this happened to me in university. Luckily I could just remove the battery to shut it up quickly. I never use the speaker for anything ever really, so I just removed it. I get it, it's an important(-ish) alarm, the user should be informed. Sure, blink the screen red and do whatever, but do not beep at me!
Also got a new battery for the ThinkPad, because the on I had died. At first I thought the new one was wonky as well, becaue when I carried the laptop around it had a tendency to turn off. Turns out the batteries case isn't quite fitting, so the problem was that it slid out of the slot slightly. So I am now one of those weirdos whose laptops are hold together by duct tape. Huh. Anyway, I have a usable laptop again. And the time I get out of the battery isn't bad: When I work at uni for a few hours and come home, it is usually still somewhere between 60% and 70%. A bit less when I do image processing. Nice!
I fixed the flaky nature of my ThinkPads WiFi. For a few weeks I just thought the new WiFi chip I installed was broken or something. But turns out I had, for whatever reason, turned on
EnableNetworkConfiguration
in my iwd config, which conflicted with systemd-networkd, causing iwd to crap itself every few hours (or every few minutes when connected to eduroam). I probably would have fixed it much sooner, but between Semesters I usually don't get my laptop out much.I got a new keyboard. Nothing fancy, but it is a split one. I found it in a store, which surprised me, so I got it on an impulse. Turns out each half is effectively its own standalone keyboard and one has a USB hub built-in to connect the other. Hence me implementing keyboard groups in river.
And that's it! See you next year!